package cn.learn.data_structure;

import java.util.HashMap;
import java.util.Hashtable;
import java.util.LinkedHashSet;
import java.util.Map;

/**
 * @author huangyezhan
 * @version 1.0
 * @date 2021年07月09日10:58
 */
public class ArraysDemo {

    public static void main(String[] args) {
        // 传递的数组必须是对象数组，而不是基本类型。
       /* int[] myArray = {1, 2, 3};
        List  myList  = Arrays.asList(myArray);

        // 1
        System.out.println(myList.size());
        //数组地址值
        System.out.println(myList.get(0));
        //报错：ArrayIndexOutOfBoundsException
        System.out.println(myList.get(1));
        int[] array = (int[]) myList.get(0);
        //1
        System.out.println(array[0]);
*/
       /* Integer[] myArray = {1, 2, 3};
        List<Integer> myList = Arrays.asList(myArray);
        myList.add(4);*/

        Map<String, Object> map = new HashMap<>(4);

        map.put("a", "hao");
        System.out.println(map);

        Map<String, Object> table = new Hashtable<>();
        table.put(null, "null");

        new LinkedHashSet<>();


    }


}
